package com.yz.service.impl;

import com.yz.dao.TagMapper;
import com.yz.pojo.Tag;
import com.yz.service.TagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TagServiceImpl implements TagService {

    @Autowired
    private TagMapper tagMapper;

    @Override
    public List<Tag> queryAllTags() {
        return tagMapper.queryAllTags();
    }

    @Override
    public int insertTag(String name) {
        return tagMapper.insertTag(name);
    }

    @Override
    public int insertTags(String[] names) {
        return tagMapper.insertTags(names);
    }

    @Override
    public int deleteTag(Integer[] ids) {
        return tagMapper.deleteTag(ids);
    }

    @Override
    public int countTag() {
        return tagMapper.countTag();
    }

    @Override
    public Integer[] queryIdByNames(String[] names) {
        return tagMapper.queryIdByNames(names);
    }
}
